package interfaces;

/**
 * @classname:Pig
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/28 17:32
 * @version: 0.1
 * @since:1.8
 */
public class Pig extends Pet {
    private String haircolor;

    public Pig(String haircolor) {
        this.haircolor = haircolor;
    }
    public Pig() {
    }
    public Pig(String name, String gender, int exp, int degree, String haircolor) {
        super(name, gender, exp, degree);
        this.haircolor = haircolor;
    }
    public  void roll(){
        System.out.println(this.getName()+"在滚动");
    }
    @Override
    public void follow() {
        System.out.println(this.getName()+"跟随主人");
    }

    @Override
    public void eat() {
        System.out.println(this.getName()+"吃东西");
    }
}
